/**
 * 
 */
package com.massyframework.beanskin.graphql.fetching;

import graphql.execution.MergedField;
import graphql.schema.GraphQLObjectType;
import graphql.schema.GraphQLSchema;

/**
 * {@link MergedFieldTransformer}
 * @author huangkh
 *
 */
public interface MergedFieldTransformer {

	/**
	 * 结合{@code objectType}, 对{@code src}进行变形.
	 * <p>变形的结果是增加返回给前端的字段/属性</p>
	 * @param src {@link MergedField}, 来源的合并字段
	 * @param objectType {@link GraphQLObjectType}, 要输出的GraphQL类型
	 * @param schema {@link GraphQLSchema},graphql模型
	 * @return {@link MergedField},变形后的字段
	 */
	MergedField transform(MergedField src, GraphQLObjectType objectType, GraphQLSchema schema);
}
